#include <string>
#include <boost/asio.hpp>
#include <boost/system.hpp>
#include <boost/beast/core.hpp>
int main(int argc, char const *argv[])
{
    //buffer
    {
        //flat_buffer
        {
            boost::beast::flat_buffer buffer;
            std::string str="hello world";
            buffer.commit(boost::asio::buffer_copy(buffer.prepare(str.size()), boost::asio::buffer(str)));
            str.clear();
            str.resize(buffer.size());
            buffer.consume(boost::asio::buffer_copy(boost::asio::buffer(str),buffer.data()));
        }
        //multi_buffer
        {
            boost::beast::multi_buffer buffer;
            std::string str="hello world";
            buffer.commit(boost::asio::buffer_copy(buffer.prepare(str.size()), boost::asio::buffer(str)));
            str.clear();
            str.resize(buffer.size());
            buffer.consume(boost::asio::buffer_copy(boost::asio::buffer(str),buffer.data()));
        }
    }
    //error_code
    {
        boost::system::error_code  ce;
    }
    return 0;
}


